home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************************************
- 6/96 bob Updated #includes to support changed GX Library names. Added the copyright date.
-
- ©1990 - 1996 Apple Computer, Inc.
- All rights reserved.
- ****************************************************************************************************/
- #include <Types.h>
- #include <QuickDraw.h>
- #include <Fonts.h>
- #include <Windows.h>
- #include <Menus.h>
- #include <SegLoad.h>
- #include <Memory.h>
- #include <Desk.h>
-
- #include <GXGraphics.h>
- #include "GraphicsLibraries.h"
- #include <GXEnvironment.h>
-
- #include <GXTypes.h>
- #include <GXLayout.h>
- #include "LayoutLibrary.h"
-
- #include "SampleInterface.h"
-
- short MyStrLen(char *x);
- static short MyStrLen(x)
- char *x;
- {
- short c = 0;
- while (*x++) c++;
- return c;
- } /* MyStrLen */
-
- void VerticalLines(WindowPtr sampleWindow)
- {
- /* Variables */
- char *myString = "Neat Text!";
- gxLayoutOptions gxLayoutOptions;
- gxPoint myPoint;
- gxShape layout;
- short len, level = 0;
- gxStyle myStyle;
- gxViewPort aViewPort;
-
- /* Initialization */
-
- myPoint.x = ff(20);
- myPoint.y = ff(50);
-
- aViewPort = GXNewWindowViewPort(sampleWindow);
- SetDefaultViewPort(aViewPort);
-
- len = MyStrLen(myString);
- InitializeLayoutOptions(&gxLayoutOptions);
-
- myStyle = NewLayoutStyle((char *) "\pHelvertical", ff(40), 0, nil, nil, 0, nil);
-
- layout = GXNewLayout(
- 1, &len, (void *) &myString,
- 1, &len, &myStyle,
- 1, &len, &level,
- &gxLayoutOptions, &myPoint);
- GXDrawShape(layout);
-
- GXSetStyleTextAttributes(myStyle, gxVerticalText);
- GXRotateShape(layout, ff(90), ff(0), ff(0));
- GXMoveShape(layout, ff(100), ff(60));
- GXDrawShape(layout);
-
- GXDisposeShape(layout);
- GXDisposeStyle(myStyle);
- GXDisposeViewPort(aViewPort);
- } /* main */
-